Ext.define('Seq.button.BadgeButton', {
	        extend : 'Ext.button.Button',
	        xtype : 'xbadgebutton',

	        config : {
		        badgeText : null
	        },

	        listeners : {
		        render : function(cmp) {
			        var dom = cmp.getEl();
			        cmp.html = dom.createChild({
				                tag : 'span',
				                html : cmp.config.badgeText,
				                reference : 'badgeElement',
				                'class' : Ext.baseCSSPrefix + 'badge'
			                }, dom.first());
		        }
	        },

	        setBadgeText : function(badgeText) {
		        var dom = this.getEl();
		        var badgeElement = dom && dom.child('[reference="badgeElement"]');
		        if (badgeElement) {
			        if (badgeText) {
				        badgeElement.show();
				        badgeElement.setText(badgeText);
			        } else {
				        badgeElement.hide();
			        }
		        }
	        }

        });